# coding:utf8
class UrlManager(object):
    def __init__(self):
        self.urllist = []
        self.haslist = []

    def add_new_url(self, urls):
        if urls ==None or len(urls) == 0:
            return
        for i in urls:
            if i in self.haslist:
                continue
            else:
                self.urllist.append(i)
                self.haslist.append(i)

    def has_new_url(self):
        if len(self.urllist)!=0:
            return True
        else:
            return False

    def get_new_url(self):
        tmp_url = self.urllist[-1]
        self.urllist.pop()
        return tmp_url
